package com.n3wax.automation.security.isy;


import com.n3wax.automation.security.WebAlarmHandler;
import com.n3wax.automation.security.ademco.ad2usb.AD2USBController;
import org.eclipse.jetty.server.Server;


/**
 * Created by IntelliJ IDEA.
 * User: HP_Administrator
 * Date: 11/9/11
 * Time: 10:39 PM
 * To change this template use File | Settings | File Templates.
 */
public class IsyListener {
    public IsyListener(AD2USBController controller) {
        Server srv = new Server(8080);
        try {
            srv.setHandler(new WebAlarmHandler(controller));
            srv.start();
            srv.join();
        } catch (InterruptedException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (Exception e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
    }
}
